home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / program / ccdl151s.zip / INCLUDE / HASH.H < prev    next >
C/C++ Source or Header  |  1995-03-18  |  691b  |  22 lines

  1. #ifndef _HASH_H
  2. #define _HASH_H
  3.  
  4. /* Local hash table functions.  Librarian uses a different set of functions */
  5. /* Size is a prime number */
  6. #define HASHSIZE 1021
  7.  
  8. /* Rotations in C */
  9. #define ROTR(x,bits) (((x << (16 - bits)) | (x >> bits)) & 0xffff)
  10. #define ROTL(x,bits) (((x << bits) | (x >> (16 - bits))) & 0xffff)
  11.  
  12. /* Hash table record definition, all entries in a hash table must be
  13.  * structures with the first two elements as given because hash table
  14.  * entries are sometimes handled generically */
  15. typedef struct _hashrec_ {
  16.    struct _hashrec_ *link;    /* Link to next element in list */
  17.    char *key;    /* Full key */
  18. } HASHREC;
  19.  
  20. #include "hash.p"
  21.  
  22. #endif _HASH_H